package card

const (
	GETCODEURL     = "https://api.weixin.qq.com/card/code/get?access_token="     //查询code接口地址
	CONSUMECODEURL = "https://api.weixin.qq.com/card/code/consume?access_token=" //核销code接口地址
)

type GetCodeParam struct {
	Code          string `json:"code"`
	Check_consume bool   `json:"check_consume"`
}

type CodeRet struct {
	Errcode          int    `json:"errcode"`
	Errmsg           string `json:"errmsg"`
	Card             Card   `json:"card"`
	Openid           string `json:"openid"`
	Can_consume      bool   `json:"can_consume"`
	User_card_status string `json:"user_card_status"`
}

type Card struct {
	Card_id    string `json:"card_id"`
	Begin_time int    `json:"begin_time"`
	End_time   int    `json:"end_time"`
	Title      string `json:"title"`
	Desc       string `json:"desc"`
	Url        string `json:"url"`
}

type ComsumeParam struct {
	Code string `json:"code"`
}

// type SignInfo struct {
// 	Sign      string `json:"sign"`
// 	Nonce_str string `json:"nonce_str"`
// 	Timestamp string `json:"timestamp"`
// }

type GetSignParam struct {
	Card_id   string `json:"card_id"`
	Card_type string `json:"card_type"`
}
